package com.feihong.txgw.inter.contract.llcx;

import com.feihong.txgw.model.bean.llcx.PhoneCardLocation;
import com.feihong.txgw.ui.mvp.model.IBaseModel;
import com.feihong.txgw.ui.mvp.precenter.AbBasePrecenter;
import com.feihong.txgw.ui.mvp.view.IBaseActivity;

import io.reactivex.Observable;

/**
 * @Author wangziheng
 * @ProjectName txgw_app
 * @ClassName ITelSpaceContract
 * @package com.feihong.txgw.inter.contract.llcx
 * @data 2018/5/7 16:46
 * @Describe
 * @Change
 */
public interface ITelSpaceContract {

    interface ITelSpaceMainView extends IBaseActivity{

        void vertifyTelResult(PhoneCardLocation phoneCardLocation);

        void vertifyTelError();

        void sendVertifyCode(String result);

        void sendVertifyCodeError();

        void getTelSpace(String result);

        void getTelSpaceError();
    }

    interface ITelSpaceMainModel extends IBaseModel{
        /**
         * 验证手机号码
         * @param telNum
         * @return
         */
        Observable<PhoneCardLocation> vertifyTel(String telNum);

        /**
         *  获取手机套餐信息
         * @param icpID
         * @param telNum
         * @param code
         * @return
         */
        Observable<String> getTelSpace(String icpID,String telNum,String code);

        /**
         * 发送验证码
         * @param icpID
         * @param telNum
         * @return
         */
        Observable<String> sendVerityCode(String icpID,String telNum);
    }

    abstract class AbTelSpaceMainprecenter extends AbBasePrecenter<ITelSpaceMainModel,ITelSpaceMainView>{

        public abstract void vertifyTelType(String telNum);

        public abstract void sendVertiryCode(String icpID,String telNum);

        public abstract void getTelSpace(String icpID,String telNum,String code);
    }

}
